﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.Entity;

using HST.Domain.Seedwork;

namespace HST.Infrastructure.Data.Seedwork
{
    public interface IDataContext : IUnitOfWork, ISql
    {
        /// <summary>
        /// Returns a IDbSet instance for access to entities of the given type in the context, 
        /// the ObjectStateManager, and the underlying store. 
        /// </summary>
        /// <typeparam name="TValueObject"></typeparam>
        /// <returns></returns>
        DbSet<TAggregateRoot> CreateSet<TAggregateRoot>() where TAggregateRoot : class;

        /// <summary>
        /// Set object as modified
        /// </summary>
        /// <typeparam name="TValueObject">The type of entity</typeparam>
        /// <param name="item">The entity item to set as modifed</param>
        void SetModified<TAggregateRoot>(TAggregateRoot aggregateRoot) where TAggregateRoot : class;
    }
}
